package com.neu.questionnaire_system.mapper;

import com.neu.questionnaire_system.entity.Admin;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xingle
 * @since 2022-10-31
 */
@Mapper
public interface AdminMapper extends BaseMapper<Admin> {

    /**
     * created by libo 根据管理员名字查询管理员id
     * @param adminName 管理员名字
     * @return 管理员的id
     */
    @Select("select id from admin where adminName = #{adminName}")
    String findIdByName(@Param("adminName")String adminName);

    /**
     *
     * @param admin 登录的管理员名字与密码
     * @return 返回管理员信息
     */
    Admin queryAdminInfo(Admin admin);


}
